<template>
  <div>
    <company-header></company-header>
    <company-Search :companys="companys"></company-Search>
    <company-list :hotCompany="hotCompany" :companys="companys"></company-list>
  </div>
</template>

<script>
// import ApiUrl from '@/config/api_url'
import axios from "axios";
import CompanyHeader from "./components/Header";
import CompanySearch from "./components/Search";
import CompanyList from "./components/List";

export default {
  name: "Company",
  components: {
    CompanyHeader,
    CompanySearch,
    CompanyList
  },
  data() {
    return {
      hotCompany: [],
      companys: {},
    };
  },
  methods: {
    getCompanyInfo () {
      // axios.get(ApiUrl.api + 'city.json?city=')
      //   .then(this.handleGetCityInfoSucc)
      axios.get('/api/company.json')
        .then(this.GetCompanyInfoSucc)
    },
    GetCompanyInfoSucc (res) {
        // console.log(res)
      if (res.status == 200 && res.data) {
        this.hotCompany = res.data.hotCompany
        this.companys = res.data.companys
      }
    },
    handleLetterChange (letter) {
      this.letter = letter
    }
  },
  mounted () {
    this.getCompanyInfo()
  }
};
</script>

<style lang="scss" scoped>
</style>

